The present invention relates to motion control systems and, more particularly, to interface software that facilitates the creation of hardware independent motion control software.
1. Background of the Invention
The purpose of a motion control device is to move an object in a desired manner. The basic components of a motion control device are a controller and a mechanical system. The mechanical system translates signals generated by the controller into movement of an object.
While the mechanical system commonly comprises a drive and an electrical motor, a number of other systems, such as hydraulic or vibrational systems, can be used to cause movement of an object based on a control signal. Additionally, it is possible for a motion control device to comprise a plurality of drives and motors to allow multi-axis control of the movement of the object.
The present invention is of particular importance in the context of a mechanical system including at least one drive and electrical motor having a rotating shaft connected in some way to the object to be moved, and that application will be described in detail herein. But the principles of the present invention are generally applicable to any mechanical system that generates movement based on a control signal. The scope of the present invention should thus be determined based on the claims appended hereto and not the following detailed description.
In a mechanical system comprising a controller, a drive, and an electrical motor, the motor is physically connected to the object to be moved such that rotation of the motor shaft is translated into movement of the object. The drive is an electronic power amplifier adapted to provide power to a motor to rotate the motor shaft in a controlled manner. Based on control commands, the controller controls the drive in a predictable manner such that the object is moved in the desired manner.
These basic components are normally placed into a larger system to accomplish a specific task. For example, one controller may operate in conjunction with several drives and motors in a multi-axis system for moving a tool along a predetermined path relative to a workpiece.
Additionally, the basic components described above are often used in conjunction with a host computer or programmable logic controller (PLC). The host computer or PLC allows the use of a high-level programming language to generate control commands that are passed to the controller. Software running on the host computer is thus designed to simplify the task of programming the controller.
Companies that manufacture motion control devices are, traditionally, hardware oriented companies that manufacture software dedicated to the hardware that they manufacture. These software products may be referred to as low level programs. Low level programs usually work directly with the motion control command language specific to a given motion control device. While such low level programs offer the programmer substantially complete control over the hardware, these programs are highly hardware dependent.
In contrast to low-level programs, high-level software programs, referred to sometimes as factory automation applications, allow a factory system designer to develop application programs that combine large numbers of input/output (I/O) devices, including motion control devices, into a complex system used to automate a factory floor environment. These factory automation applications allow any number of I/O devices to be used in a given system, as long as these devices are supported by the high-level program. Custom applications, developed by other software developers, cannot be developed to take advantage of the simple motion control functionality offered by the factory automation program.
Additionally, these programs do not allow the programmer a great degree of control over the each motion control device in the system. Each program developed with a factory automation application must run within the context of that application.
2. Prior Art
In the following discussions, a number of documents are cited that are publicly available as of the filing date of the present invention. With many of these documents, the Applicant is not aware of exact publishing dates. The citation of these documents should thus not be considered an admission that they are prior art; the Applicant will take the steps necessary to establish whether these documents are prior art if necessary.
As mentioned above, a number of software programs currently exist for programming individual motion control devices or for aiding in the development of systems containing a number of motion control devices.
The following is a list of documents disclosing presently commercially available high-level software programs: (a) Software Products For Industrial Automation, iconics 1993; (b) The complete, computer-based automation tool (IGSS), Seven Technologies A/S; (c) OpenBatch Product Brief, PID, Inc.; (d) FIX Product Brochure, Intellution (1994); (e) Paragon TNT Product Brochure, Intec Controls Corp.; (f) WEB 3.0 Product Brochure, Trihedral Engineering Ltd. (1994); and (g) AIMAX-WIN Product Brochure, TA Engineering Co., Inc. The following documents disclose simulation software: (a) ExperTune PID Tuning Software, Gerry Engineering Software; and (b) XANALOG Model NL-SIM Product Brochure, XANALOG.
The following list identifies documents related to low-level programs: (a) Compumotor Digiplan 1993-94 catalog, pages 10-11; (b) Aerotech Motion Control Product Guide, pages 233-34; (c) PMAC Product Catalog, page 43; (d) PC/DSP-Series Motion Controller C Programming Guide, pages 1-3; (e) Oregon Micro Systems Product Guide, page 17; (f) Precision Microcontrol Product Guide.
The Applicants are also aware of a software model referred to as WOSA that has been defined by Microsoft for use in the Windows programming environment. The WOSA model is discussed in the book Inside Windows 95, on pages 348-351. WOSA is also discussed in the paper entitled WOSA Backgrounder: Delivering Enterprise Services to the Windows-based Desktop. The WOSA model isolates application programmers from the complexities of programming to different service providers by providing an API layer that is independent of an underlying hardware or service and an SPI layer that is hardware independent but service dependent. The WOSA model has no relation to motion control devices.
The Applicants are also aware of the common programming practice in which drivers are provided for hardware such as printers or the like; an application program such as a word processor allows a user to select a driver associated with a given printer to allow the application program to print on that given printer.
While this approach does isolates the application programmer from the complexities of programming to each hardware configuration in existence, this approach does not provide the application programmer with the ability to control the hardware in base incremental steps. In the printer example, an application programmer will not be able to control each stepper motor in the printer using the provided printer driver; instead, the printer driver will control a number of stepper motors in the printer in a predetermined sequence as necessary to implement a group of high level commands.
The software driver model currently used for printers and the like is thus not applicable to the development of a sequence of control commands for motion control devices.
From the foregoing, it should be clear that one primary object of the invention is to provide improved methods and devices for moving objects.
Another more specific object of the present invention is to obtain methods and apparatus for designing and deploying motion control devices in which these methods and apparatus exhibit a favorable mix of the following characteristics:
(a) allow the creation of high-level motion control programs that are hardware independent, but offer programmability of base motion operations;
(b) hide the complexities of programming for multiple hardware configurations from the high-level programmer;
(c) can easily be extended to support additional hardware configurations; and
(c) transparently supports industry standard high-level programming environments.
The present invention is, in one form, a method of moving an object comprising the steps of developing a high-level motion control application program comprising a sequence of component functions that describe a desired object path, correlating these component functions with driver functions, selecting a software driver for the specific hardware configuration being controlled, generating control commands from the driver functions and the software driver associated with the hardware configuration being controlled, and controlling a motion control device based on the control data to move the object along the desired object path.
In another form, the present invention is a method of generating a sequence of control commands for controlling a motion control devices to move an object along a desired path. An application program comprising a series of component functions defines a sequence of motion steps that must be performed by the motion control device to move the object along the desired path. The component functions contain code that relates the component functions to driver functions. The driver functions are associated with, or contain, software drivers containing driver code for implementing the motion steps on a given motion control device. The control commands are generated based on the application program and the driver code associated with a given motion control device.
The use of component functions that are separate from driver functions isolates the programmer from the complexities of programming to a specific motion control device. This arrangement also allows a given application program to be used without modification for any motion control device having a software driver associated therewith.
The driver functions are grouped into core driver functions and extended driver functions. All software drivers must support the core driver functions; the software drivers may also support one or more of the extended driver functions, although this is not required.
Where the software drivers do not support the extended driver functions, the functionality associated with the extended driver functions can normally be simulated using some combination of core driver functions. In this case, the method of the present invention comprises the steps of determining which of the extended driver functions are not supported by the software driver and, where possible, substituting a combination of core driver functions. In some cases, the functionality of an extended driver function cannot be emulated using core driver functions, and this functionality is simply unavailable to the programmer.
The use of core driver functions to emulate extended driver functions provides functionality where none would otherwise exist, but the preferred approach is to provide a software driver that supports each of the extended driver functions. When an extended driver function is supported and not emulated, the task being performed will normally be accomplished more quickly and accurately.
Additionally, to simplify the use of emulated extended driver functions, the method of the present invention further comprises the steps of determining which, if any, extended driver functions are not supported by the software driver for a given hardware configuration, developing a function pointer table of both unsupported extended driver functions and supported extended driver functions, and consulting the table each time an extended driver function is called to determine whether that extended driver function must be emulated. In this manner, the process of calling the sequence of core driver functions employed to emulate the unsupported extended driver functions is optimized.
As the control commands are generated as described above, they may be used to control a motion control device in real time or they may be stored in a file for later use. Preferably, the method of the present invention comprises the step of providing a number of streams containing stream code. Each stream is associated with a destination of control commands, and the stream code of a given stream dictates how the control commands are to be transferred to the destination associated with that given stream. The user is thus provided the opportunity to select one or more streams that dictate the destination of the control commands.
To help isolate the programmer from hardware specific complexities, the method of the present invention may comprise the additional administrative steps such as selecting a driver associated with a particular motion control device and/or translating units required to define the motion control system into the particular system of units employed by a given motion control device.